from django.http import HttpResponse
from django.shortcuts import render

# Create your views here.
#  登录首页
def index_view(request):
    return render(request,'login.html')

 # 处理登录功能
def login_view(request):
    #接受请求的参数
    uname=request.GET.get('uname','')# 取html页面的unname的值，如果没有返回''
    pwd=request.GET.get('pwd','')
    #判断
    if uname=='zhangsan' and pwd=="123":
        return HttpResponse('登录成功')
    return HttpResponse("登录失败！")





